<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Lazy | 负载均衡管理</title>
    {% load staticfiles %} {% load custom_filter %}

    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="{% static "bootstrap/css/bootstrap.min.css" %}">
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="{% static "dist/css/font-awesome.min.css" %}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="{% static "dist/css/ionicons.min.css" %}">
    <!-- Theme style -->
    <link rel="stylesheet" href="{% static "dist/css/AdminLTE.min.css" %}">
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
        page. However, you can choose any other skin. Make sure you
        apply the skin class to the body tag so the changes take effect.
  -->
    <link rel="stylesheet" href="{% static "dist/css/skins/skin-blue.min.css" %}">

    <!-- REQUIRED JS SCRIPTS -->
    <!-- jQuery 2.2.3 -->
    <script src="{% static "plugins/jQuery/jquery-2.2.3.min.js" %}"></script>
    <!-- Bootstrap 3.3.6 -->
    <script src="{% static "bootstrap/js/bootstrap.min.js" %}"></script>
    <!-- AdminLTE App -->
    <script src="{% static "dist/js/app.min.js" %}"></script>
    <!-- Inputmask -->
    <script src="{% static "plugins/input-mask/inputmask.min.js" %}"></script>
    <script src="{% static "plugins/FileSaver/FileSaver.min.js" %}"></script>
    <script src="{% static "plugins/input-mask/jquery.inputmask.min.js" %}"></script>
    <script src="{% static "plugins/input-mask/inputmask.extensions.min.js" %}"></script>
    <script src="{% static "plugins/input-mask/inputmask.numeric.extensions.min.js" %}"></script>

    <script src="{% static "plugins/ace/ace.js" %}"></script>
    <script src="{% static "plugins/ace/mode-nginx.js" %}"></script>
    <script src="{% static "plugins/ace/theme-monokai.js" %}"></script>

</head>

<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">

        <!-- Main Header -->
        <header class="main-header">

            <!-- Logo -->
            <a href="#" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini"><b>懒</b></span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg"><b>Lazy</b>负载均衡管理</span>
            </a>

            <!-- Header Navbar -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                </a>
                <!-- Navbar Right Menu -->
                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">
                        <!-- User Account Menu -->
                        <li class="dropdown user user-menu">
                            <!-- Menu Toggle Button -->
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <!-- The user image in the navbar-->
                                <img src="{% static "dist/img/user2-160x160.jpg" %}" class="user-image" alt="User Image">
                                <!-- hidden-xs hides the username on small devices so only the image appears. -->
                                <span class="hidden-xs">{{ user.name }}</span>
                            </a>
                            <ul class="dropdown-menu">
                                <!-- The user image in the menu -->
                                <li class="user-header">
                                    <img src="{% static "dist/img/user2-160x160.jpg" %}" class="img-circle" alt="User Image">
                                    <p>
                                        {{ user.name }}
                                        <small>{{ user.date | timestamp_to_date }}</small>
                                    </p>
                                </li>
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-right">
                                        <a href="/logout/" class="btn btn-default btn-flat">注销</a>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
        <!-- Left side column. contains the logo and sidebar -->
        <aside class="main-sidebar">

            <!-- sidebar: style can be found in sidebar.less -->
            <section class="sidebar">

                <!-- Sidebar Menu -->
                <ul class="sidebar-menu">
                    <li class="header">目录</li>
                    <!-- Optionally, you can add icons to the links -->
                    <li id="menu_dashboard"><a href="/dashboard/"><i class="fa fa-dashboard"></i> <span>服务状态</span></a></li>
                    <li id="menu_service" class="treeview active">
                        <a href="#"><i class="fa fa-server"></i> <span>服务管理</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                        <ul class="treeview-menu">
                            <li id="menu_main_config"><a href="/main/">全局配置</a></li>
                            <li id="menu_proxy_config"><a href="/proxy/">负载均衡配置</a></li>
                        </ul>
                    </li>
                    <li id="menu_system_config"><a href="/settings/"><i class="fa fa-cog"></i> <span>系统配置</span></a></li>
                </ul>
                <!-- /.sidebar-menu -->
            </section>
            <!-- /.sidebar -->
        </aside>

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>
                <span id="page_header"></span>
                <small>
                    <span id="page_header_descript"></span>
                </small>
            </h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> <span id="page_nav"></span></a></li>
                    <li class="active"><span id="page_name"></span></li>
                </ol>
            </section>

            <!-- Main content -->
            <section class="content">

                <!-- Your Page Content Here -->
                {% block content %} {% endblock %}

            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->

        <!-- Main Footer -->
        <footer class="main-footer">
            <!-- To the right -->
            <div class="pull-right hidden-xs">
                <a href="http://www.ichegg.org" target="_blank">www.ichegg.org</a>
            </div>
            <!-- Default to the left -->
            <strong>Copyright &copy; 2016 <a href="#">Xiaobao</a>.</strong> All rights reserved.
        </footer>

    </div>
    <!-- ./wrapper -->

    <script>
        $.fn.serializeObject = function() {
            var o = {};
            var a = this.serializeArray();
            $.each(a, function() {
                if (o[this.name]) {
                    if (!o[this.name].push) {
                        o[this.name] = [o[this.name]];
                    }
                    o[this.name].push(this.value || '');
                } else {
                    o[this.name] = this.value || '';
                }
            });
            return o;
        };
    </script>
</body>

</html>
